import request from '@/utils/request'

// 查询支付优惠列表
export function listOrderPromotion(query) {
  return request({
    url: '/order/orderPromotion/list',
    method: 'get',
    params: query
  })
}

// 查询支付优惠详细
export function getOrderPromotion(id) {
  return request({
    url: '/order/orderPromotion/' + id,
    method: 'get'
  })
}

// 新增支付优惠
export function addOrderPromotion(data) {
  return request({
    url: '/order/orderPromotion',
    method: 'post',
    data: data
  })
}

// 修改支付优惠
export function updateOrderPromotion(data) {
  return request({
    url: '/order/orderPromotion',
    method: 'put',
    data: data
  })
}

// 删除支付优惠
export function delOrderPromotion(id) {
  return request({
    url: '/cinema/orderPromotion/' + id,
    method: 'delete'
  })
}

// 导出支付优惠
export function exportOrderPromotion(query) {
  return request({
    url: '/order/orderPromotion/export',
    method: 'get',
    params: query
  })
}
